package com.bana.fvs.app.mvp.model;

import com.bana.fvs.app.mvp.ConstantsValue;
import com.bana.fvs.app.mvp.contract.FogLampListContract;
import com.bana.fvs.app.util.CommonUtils;
import com.wei.commonlibrary.net.OkhttpRequest;

import java.util.HashMap;

/**
 * Created by wei on 2018/4/1.
 */

public class FogLampModel extends FogLampListContract.AbsFogLampModel {
    @Override
    public void onStart() {

    }

    @Override
    public OkhttpRequest getFogLampList(String token, String kzqbm, int pagenum, int pageSize) {
        HashMap<String, Object> params = CommonUtils.getParams(token);

        HashMap<String, String> data = new HashMap<>();
        data.put("kzqbm", kzqbm);

        params.put("data", data);
//        params.put("pagenum", pagenum);
//        params.put("pageSize", pageSize);
        return okhttpRequest.url(iApiService.getLampList(params));
    }


    @Override
    public OkhttpRequest http_controlLamp(String token, String sbbm, String kzcz) {
        HashMap<String, Object> map = new HashMap<>();
        map.put(ConstantsValue.TOKEN, token);
        map.put(ConstantsValue.SBBM, sbbm);//
        map.put(ConstantsValue.KZCZ, kzcz);//
        return okhttpRequest.url(iApiService.foglightCtrl(map));
    }
}
